package com.bwda.dsrs.filecenter.controller;

import com.bwda.dsrs.base.centerbase.response.ResponseEntity;
import com.bwda.dsrs.base.util.UUIDUtil;
import com.bwda.dsrs.filecenter.annotations.IgnoreClientToken;
import com.bwda.dsrs.filecenter.aspect.LogTypeEnum;
import com.bwda.dsrs.filecenter.aspect.Loggable;
import com.bwda.dsrs.filecenter.domain.exception.BusinessServiceException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * simple introduction
 *
 * @author wangju
 * @date 2020/8/17
 */
@RestController
@RequestMapping("/b/fileinfo")
@Api(value = "/b/fileinfo", tags = "文件信息表")
public class FileInfoController extends BaseController {

	public static final String IV = "face0123456789ai";


	@Value("${aes_key}")
	private String aeskey;

	@IgnoreClientToken
	@ApiOperation(value = "queryFileParamName", notes = "queryFileParamName", httpMethod = "GET")
	@Loggable(descp = "queryFileParamName", type = LogTypeEnum.QUERY, include = "")
	@RequestMapping(value = "/queryFileParamName", method = {RequestMethod.GET, RequestMethod.POST})
	public ResponseEntity<String> queryFileParamName() throws BusinessServiceException {
		String fileParamName = UUIDUtil.getUuid()+aeskey+UUIDUtil.getUuid()+IV;
		return getSuccessResult(fileParamName);
	}


}
